Skip to content

Improve notification silence docs#394

Open
adityathebe wants to merge 8 commits intomainfrom
docs/silences-crd
Open

Improve notification silence docs#394
adityathebe wants to merge 8 commits intomainfrom
docs/silences-crd

Conversation

@adityathebe
Copy link
Member

@adityathebe adityathebe commented May 22, 2025

resolves: #389

Summary by CodeRabbit

  • Documentation
    • Enhanced silence documentation with clearer explanations of silence object properties, including time ranges and recursive behavior
    • Added guide for creating silences through UI, Slack templates, and custom resources
    • Improved organization and examples for selectors and filters sections
    • Expanded template variables reference documentation

@netlify
Copy link

netlify bot commented May 22, 2025

Deploy Preview for flanksource-docs ready!

Name Link
🔨 Latest commit 4c2741b
🔍 Latest deploy log https://app.netlify.com/projects/flanksource-docs/deploys/68904585e96e3b000853c097
😎 Deploy Preview https://deploy-preview-394--flanksource-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented May 22, 2025

Deploy Preview for canarychecker ready!

Name Link
🔨 Latest commit d5edf89
🔍 Latest deploy log https://app.netlify.com/projects/canarychecker/deploys/699343e1d0952d00087aedee
😎 Deploy Preview https://deploy-preview-394--canarychecker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@adityathebe adityathebe requested a review from moshloop May 22, 2025 05:19
@moshloop moshloop requested a review from Copilot May 23, 2025 06:51
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates several submodule references and enhances the documentation for notification silences by adding a detailed reference MDX and reorganizing the conceptual guide.

  • Bump submodule commits in multiple modules/* and the root mission-control-chart
  • Introduce _silence.mdx to document silence fields and resource selector schema
  • Revise silences.mdx guide with an import, example fixture, and clearer sections on creation, filters, and recursion

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
modules/mission-control-registry updated subproject commit
modules/mission-control-chart updated subproject commit
modules/mission-control updated subproject commit
modules/duty updated subproject commit
modules/canary-checker updated subproject commit
mission-control-chart updated subproject commit
mission-control/docs/reference/notifications/_silence.mdx new reference doc for silence API fields
mission-control/docs/guide/notifications/concepts/silences.mdx restructured guide with import, example block, and sections

@moshloop
Copy link
Member

Can we add an example of a filter in a full spec. The selectors table also seems incomplete.

@adityathebe
Copy link
Member Author

Can we add an example of a filter in a full spec. The selectors table also seems incomplete.

flanksource/mission-control#2115

@adityathebe adityathebe requested a review from moshloop June 4, 2025 07:26
@vercel
Copy link

vercel bot commented Jul 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Feb 16, 2026 4:22pm

Request Review

@coderabbitai
Copy link

coderabbitai bot commented Feb 16, 2026

Warning

Rate limit exceeded

@adityathebe has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 5 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Walkthrough

Documentation for notification silences was expanded with detailed guidance on creating silences through UI, Slack templates, and custom resources, and a new reference section documenting the Silence object schema including fields for descriptions, time ranges, recursion, filters, and selectors.

Changes

Cohort / File(s) Summary
Silences Guide
mission-control/docs/guide/notifications/concepts/silences.mdx
Restructured and expanded guide content: clarified Silence object structure, introduced three creation methods (UI, Slack template, custom resource), reorganized filters into explicit "Selectors" and "Filters" subsections, added "Recursive Mode" section with clarifications, and updated terminology and examples for improved clarity.
Silences Reference Documentation
mission-control/docs/reference/notifications/_silence.mdx
New reference documentation defining the Silence object schema with fields: description (string), from/until (RFC3339 datetime), recursive (boolean), filter (CEL expression), selectors (ResourceSelector array), and nested ResourceSelector structure with kind and name fields.
🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: improving documentation for notification silences, which aligns with the primary objective of expanding CRD documentation.
Linked Issues check ✅ Passed The PR adds CRD documentation with field descriptions and examples for notification silences [#389], addressing the linked issue requirement to document the resource and provide examples.
Out of Scope Changes check ✅ Passed All changes are scoped to documentation for notification silences, including concept explanations, CRD reference, and field definitions, with no unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/silences-crd

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Fix all issues with AI agents
In `@mission-control/docs/guide/notifications/concepts/silences.mdx`:
- Around line 70-76: The image `silence-notification-form.png` under the
"Recursive Mode" heading is not illustrating recursive parent→child behavior;
move this image out of the "Recursive Mode" section and either place it under
the "Creating Silences" section or replace it with a new diagram that visually
depicts the parent→child relationship (namespace → deployments/statefulsets →
pods). Update the MDX around the "Recursive Mode" heading to reference the new
illustrative diagram (or add a caption) and ensure the image filename or alt
text clearly indicates whether it is the general creation form
(`silence-notification-form.png`) or the recursive relationship diagram.
- Around line 20-22: The YAML code fence in the MDX uses a non-existent file
reference and an empty title: update the code block in
mission-control/docs/guide/notifications/concepts/silences.mdx by either (a)
replacing
file=<rootDir>/modules/mission-control/fixtures/silences/silence-test-env.yaml
with a correct existing fixture path, (b) removing the file= directive and
pasting the YAML inline, or (c) deleting the whole code fence if not needed;
also remove the empty title="" or replace it with a meaningful label like
title="Example silence configuration", and delete the trailing space after the
closing backticks to ensure the block renders correctly.

In `@mission-control/docs/reference/notifications/_silence.mdx`:
- Around line 39-52: Update the Resource Selector block: rename the field key
"kind" to "types" in the Fields rows (the selector accepts resource type
patterns like "Kubernetes::Pod", "Kubernetes::*", "AWS::EC2::Instance"), and
either expand the rows to include the standard ResourceSelector fields (add
entries for namespace, labelSelector, tagSelector, id, health, statuses, etc.,
with brief descriptions and scheme types) or replace the rows with a single
sentence linking to the canonical ResourceSelector docs
(/docs/reference/resource-selector) if silences support the full API; ensure the
"name" entry remains and adjust descriptions to reflect matching patterns and
optionality.
- Around line 26-30: In _silence.mdx update the templateEnv entries so their
"url" values include the /docs prefix (i.e., change
"/reference/notifications/template_vars/checks",
"/reference/notifications/template_vars/config", and
"/reference/notifications/template_vars/components" to
"/docs/reference/notifications/template_vars/checks",
"/docs/reference/notifications/template_vars/config", and
"/docs/reference/notifications/template_vars/components"); locate the
templateEnv array in _silence.mdx and edit the three URL strings so they match
the /docs/... path used elsewhere.
🧹 Nitpick comments (2)
mission-control/docs/guide/notifications/concepts/silences.mdx (2)

30-37: Consider adding a full CR example with a filter.

Per reviewer feedback, a full NotificationSilence spec example that includes a filter field would help users understand how to combine selectors and filters in practice. The YAML fixture imported on line 21 may partially cover this — verify it includes a filter example, and if not, consider adding a second fixture import that demonstrates one.


56-61: Long CEL expression in table cell may hurt readability.

The catalog.traverse(...) filter on line 61 is very long for a markdown table cell. Consider moving complex examples into a separate code block below the table, or breaking the expression across multiple lines with explanation.

Add silenceURL, channel, recent_events, and groupedResources to
check and config event template variable docs. Fix templateEnv URLs
in silence reference to use /docs/ prefix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add CRD Docs with examples for notification silences

2 participants